package qianFeng.day1;

import java.util.Scanner;

public class grade_max {
    public static void main(String[] args) {
        Scanner input=new Scanner(System.in);
        int score_list[]=new int[5];
        for (int i = 0; i < score_list.length; i++) {
            System.out.print("请输入第"+(i+1)+"位同学的成绩：");
            score_list[i]=input.nextInt();
        }
        for (int element:score_list)
            System.out.print("  "+element);

        //输出5为同学的最高成绩：
        System.out.print("\n最高的成绩为："+new grade_max().max_grade(score_list));
    }
    public int max_grade(int arr[]) {
        int mix=arr[0];
        for (int i=1;i< arr.length;i++)
            if(mix<arr[i])
                mix=arr[i];
            return mix;
    }
}
